module.exports = function(api) {
  api.cache(true);
  let plugins = [];
  
  <% if (props.stylingPackage?.name === "tamagui") { %>
    plugins.push([
      '@tamagui/babel-plugin',
      {
        components: ['tamagui'],
        config: './tamagui.config.ts',
      },
    ]);
  <% } %>

  <% if (props.navigationPackage?.options.type === "drawer + tabs") { %>
    plugins.push('react-native-reanimated/plugin');
  <% } %>

  return {
    <% if (props.stylingPackage?.name === "nativewind") { %>
      presets: [
        ['babel-preset-expo', { jsxImportSource: 'nativewind' }],
        'nativewind/babel',
      ],
    <% } else { %>
      presets: ['babel-preset-expo'],
    <% } %>
    plugins,
  };
};
